
#ifndef __SCHEDULE_H__
#define __SCHEDULE_H__

typedef struct _ScheduleType 
{
	
}
ScheduleType;

// As a plan;
class ScheduleItem
{
public:
	ScheduleItem();
	~ScheduleItem();
	ScheduleItem( ScheduleItem const& );
	
	enum A1
	{
		Every,
		Some
	};

	enum A2
	{
		Year,
		Month,
		Week,
		Day,
		Hour,
		Minute,
	};


	void SetScheduleTime(A1 a1, A2 a2, SYSTEMTIME const& time);
	void SetScheduleDesc(CString const&);
	void SetScheduleType();

	void GetScheduleTime(A1& a1, A2& a2, SYSTEMTIME& time) const;

	BOOL IsValid();
	BOOL IsExpired( BOOL bToday = TRUE );
protected:

private:
	A1		m_a1;
	A2		m_a2;
	DWORD	m_type;

	SYSTEMTIME	m_time;
	SYSTEMTIME	m_created;
	CString	m_desc;
	CString m_strId;

};

#include <deque>
using std::deque;

class Schedule
{
public:

	void AddScheduleItem(ScheduleItem const&);

protected:
	BOOL IsScheduleDay( ScheduleItem const&, CTime const& );

private:
	deque< ScheduleItem > m_schedule;
};


#endif